package com.lanchetech.dao;
import java.math.BigDecimal;
import java.util.List;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.response.CollectionResp;
import com.lanchetech.entity.UserCollection;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserCollectionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserCollection record);

    int insertSelective(UserCollection record);

    UserCollection selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserCollection record);

    int updateByPrimaryKey(UserCollection record);

    Long countByUserId(@Param("userId")Long userId);

    int deleteByIdAndUserId(@Param("id")Long id,@Param("userId")Long userId);

    UserCollection findOneByUserIdAndSpuId(@Param("userId")Long userId,@Param("spuId")Long spuId);

    List<CollectionResp> findAllPage(PageReq req);

}